const { override, fixBabelImports, addLessLoader, babelInclude, babelExclude, addPostcssPlugins } = require('customize-cra');
const path = require('path')

module.exports = override(
    fixBabelImports('import', {
        libraryName: 'antd-mobile',
        style: 'css',
    }),
    addLessLoader({
        javascriptEnabled: true,
        modifyVars: {
            '@primary-color': '#1DA57A'
        }
    }),
    addPostcssPlugins([require('postcss-px2rem')({ remUnit: 100 })]),
    babelInclude([path.resolve('src')]),
    babelExclude([path.resolve('node_modules/antd-mobile')])
);